package com.lmz.project.multitudethread.tuling;

public class DoubleCheckLockTest {
    private static DoubleCheckLockTest instance =null;
    private DoubleCheckLockTest() {

    }


    //DCL
    public static DoubleCheckLockTest getInstance() {
        if (instance ==null) {
            synchronized (DoubleCheckLockTest.class) {
                if (instance == null) {
                    instance = new DoubleCheckLockTest();
                }
            }
        }
        return instance;
    }


    public static void main(String[] args) {
        DoubleCheckLockTest instance = DoubleCheckLockTest.getInstance();
    }
}
